import { useRouter } from "next/router";
import { useConfig } from "nextra-theme-docs";

export default {
  logo: () => {
    return (
      <svg
        xmlns="http://www.w3.org/2000/svg"
        width="270"
        height="77"
        viewBox="0 0 270 77"
        fill="none"
        style={{
          width: "150px",
          height: "42px",
        }}
      >
        <mask
          id="mask0_632_5"
          maskUnits="userSpaceOnUse"
          style={{ maskType: "alpha" }}
          x="0"
          y="0"
          width="77"
          height="77"
        >
          <path
            d="M77 38.5C77 59.763 59.763 77 38.5 77C17.237 77 0 59.763 0 38.5C0 17.237 17.237 0 38.5 0C59.763 0 77 17.237 77 38.5Z"
            fill="#9DC4F1"
          />
          <path
            d="M77 38.5C77 59.763 59.763 77 38.5 77C17.237 77 0 59.763 0 38.5C0 17.237 17.237 0 38.5 0C59.763 0 77 17.237 77 38.5Z"
            fill="#9DC4F1"
          />
          <path
            d="M77 38.5C77 59.763 59.763 77 38.5 77C17.237 77 0 59.763 0 38.5C0 17.237 17.237 0 38.5 0C59.763 0 77 17.237 77 38.5Z"
            fill="#9DC4F1"
          />
          <path
            d="M77 38.5C77 59.763 59.763 77 38.5 77C17.237 77 0 59.763 0 38.5C0 17.237 17.237 0 38.5 0C59.763 0 77 17.237 77 38.5Z"
            fill="#9DC4F1"
          />
        </mask>
        <g mask="url(#mask0_632_5)">
          <path
            d="M77 38.5C77 59.763 59.763 77 38.5 77C17.237 77 0 59.763 0 38.5C0 17.237 17.237 0 38.5 0C59.763 0 77 17.237 77 38.5Z"
            fill="#9DC4F1"
          />
          <path
            d="M77 38.5C77 59.763 59.763 77 38.5 77C17.237 77 0 59.763 0 38.5C0 17.237 17.237 0 38.5 0C59.763 0 77 17.237 77 38.5Z"
            fill="#9DC4F1"
          />
          <path
            d="M77 38.5C77 59.763 59.763 77 38.5 77C17.237 77 0 59.763 0 38.5C0 17.237 17.237 0 38.5 0C59.763 0 77 17.237 77 38.5Z"
            fill="#9DC4F1"
          />
          <path
            d="M77 38.5C77 59.763 59.763 77 38.5 77C17.237 77 0 59.763 0 38.5C0 17.237 17.237 0 38.5 0C59.763 0 77 17.237 77 38.5Z"
            fill="#9DC4F1"
          />
          <path
            d="M120.829 66.0359C120.829 80.3099 68.4177 93.3072 46.6795 93.3072C24.9413 93.3072 7.31903 81.7358 7.31903 67.4617C7.31903 53.1877 59.7301 40.1904 81.4683 40.1904C103.206 40.1904 120.829 51.7618 120.829 66.0359Z"
            fill="#C3EAF7"
          />
          <path
            d="M59.7937 62.4555C58.1795 77.7812 57.039 80.1166 41.6291 80.1166C26.2193 80.1166 1.93771 85.6278 14.8829 60.8662C19.2663 43.0516 24.4662 20.1609 39.8761 20.1609C55.2859 20.1609 59.7937 46.1894 59.7937 62.4555Z"
            fill="white"
          />
          <path
            d="M35.0925 24.6008C36.7517 26.7205 36.1516 29.9614 33.7522 31.8396C31.3527 33.7178 31.7393 36.1633 27.5262 32.3308C24.9693 33.7115 19.5874 25.7762 27.2908 20.3588C29.6902 18.4806 33.4333 22.4812 35.0925 24.6008Z"
            fill="white"
          />
          <path
            d="M37.0599 31.951C36.3148 34.5289 38.4237 37.4028 41.7702 38.37C45.1167 39.3373 45.8389 41.7916 48.4422 36.7175C52.4085 38.7368 60.9222 22.9372 50.4594 20.4139C47.1129 19.4467 37.805 29.373 37.0599 31.951Z"
            fill="white"
          />
          <path
            d="M44.4709 44.8112C44.4709 49.0879 43.7345 50.3655 38.9709 50.8495C33.9541 50.3655 33.4709 49.0879 33.4709 44.8112C33.4709 40.5344 35.9333 37.0674 38.9709 37.0674C42.0085 37.0674 44.4709 40.5344 44.4709 44.8112Z"
            fill="#ECECEC"
          />
          <path
            d="M41.3034 46.4621C41.3034 47.9868 39.9907 49.2228 38.3715 49.2228C36.7522 49.2228 35.4396 47.9868 35.4396 46.4621C35.4396 44.9374 36.7522 43.7014 38.3715 43.7014C39.9907 43.7014 41.3034 44.9374 41.3034 46.4621Z"
            fill="black"
          />
          <path
            d="M34.1556 35.791C34.1556 36.9961 33.5615 37.0673 32.8287 37.0673C32.0959 37.0673 31.5019 36.9961 31.5019 35.791C31.5019 34.5858 32.0959 34.9937 32.8287 34.9937C33.5615 34.9937 34.1556 34.5858 34.1556 35.791Z"
            fill="black"
          />
          <path
            d="M46.5682 35.9445C46.5682 37.1243 45.9741 37.0667 45.2413 37.0667C44.5085 37.0667 43.9145 37.1243 43.9145 35.9445C43.9145 34.7647 44.5085 35.0407 45.2413 35.0407C45.9741 35.0407 46.5682 34.7647 46.5682 35.9445Z"
            fill="black"
          />
        </g>
        <path
          d="M93.1717 51.5C92.9003 51.5 92.6783 51.4137 92.5057 51.241C92.333 51.0683 92.2467 50.8463 92.2467 50.575V26.525C92.2467 26.2537 92.333 26.0317 92.5057 25.859C92.6783 25.6863 92.9003 25.6 93.1717 25.6H97.8337C98.105 25.6 98.327 25.6863 98.4997 25.859C98.6723 26.0317 98.7587 26.2537 98.7587 26.525V34.739L105.604 26.303C105.702 26.155 105.863 26.007 106.085 25.859C106.331 25.6863 106.652 25.6 107.047 25.6H112.375C112.597 25.6 112.782 25.6863 112.93 25.859C113.078 26.007 113.152 26.1797 113.152 26.377C113.152 26.5497 113.102 26.6977 113.004 26.821L104.161 37.995L113.707 50.279C113.805 50.3777 113.855 50.5257 113.855 50.723C113.855 50.9203 113.768 51.1053 113.596 51.278C113.448 51.426 113.275 51.5 113.078 51.5H107.565C107.121 51.5 106.775 51.4013 106.529 51.204C106.307 51.0067 106.159 50.8587 106.085 50.76L98.7587 41.621V50.575C98.7587 50.8463 98.6723 51.0683 98.4997 51.241C98.327 51.4137 98.105 51.5 97.8337 51.5H93.1717ZM124.126 51.87C122.72 51.87 121.462 51.5493 120.352 50.908C119.267 50.2667 118.416 49.3293 117.799 48.096C117.182 46.838 116.874 45.3087 116.874 43.508V33.185C116.874 32.9137 116.96 32.6917 117.133 32.519C117.306 32.3463 117.528 32.26 117.799 32.26H122.424C122.695 32.26 122.917 32.3463 123.09 32.519C123.263 32.6917 123.349 32.9137 123.349 33.185V43.286C123.349 45.7033 124.434 46.912 126.605 46.912C127.616 46.912 128.418 46.6037 129.01 45.987C129.627 45.3457 129.935 44.4453 129.935 43.286V33.185C129.935 32.9137 130.021 32.6917 130.194 32.519C130.367 32.3463 130.589 32.26 130.86 32.26H135.485C135.756 32.26 135.978 32.3463 136.151 32.519C136.324 32.6917 136.41 32.9137 136.41 33.185V50.575C136.41 50.8463 136.324 51.0683 136.151 51.241C135.978 51.4137 135.756 51.5 135.485 51.5H131.193C130.946 51.5 130.724 51.4137 130.527 51.241C130.354 51.0683 130.268 50.8463 130.268 50.575V49.169C129.627 50.057 128.788 50.7353 127.752 51.204C126.741 51.648 125.532 51.87 124.126 51.87ZM143.167 51.5C142.896 51.5 142.674 51.4137 142.501 51.241C142.328 51.0683 142.242 50.8463 142.242 50.575V33.185C142.242 32.9137 142.328 32.6917 142.501 32.519C142.674 32.3463 142.896 32.26 143.167 32.26H147.2C147.471 32.26 147.693 32.3463 147.866 32.519C148.039 32.6917 148.125 32.9137 148.125 33.185V34.443C148.618 33.777 149.309 33.1973 150.197 32.704C151.085 32.186 152.133 31.9147 153.342 31.89C156.179 31.8407 158.127 32.9137 159.188 35.109C159.755 34.1717 160.569 33.407 161.63 32.815C162.691 32.1983 163.85 31.89 165.108 31.89C166.391 31.89 167.538 32.186 168.549 32.778C169.585 33.3453 170.411 34.2333 171.028 35.442C171.645 36.626 171.953 38.1677 171.953 40.067V50.575C171.953 50.8463 171.854 51.0683 171.657 51.241C171.484 51.4137 171.275 51.5 171.028 51.5H166.736C166.465 51.5 166.23 51.4137 166.033 51.241C165.86 51.0683 165.774 50.8463 165.774 50.575V40.326C165.774 39.4627 165.651 38.7843 165.404 38.291C165.157 37.773 164.824 37.403 164.405 37.181C163.986 36.959 163.505 36.848 162.962 36.848C162.518 36.848 162.074 36.959 161.63 37.181C161.211 37.403 160.865 37.773 160.594 38.291C160.347 38.7843 160.224 39.4627 160.224 40.326V50.575C160.224 50.8463 160.138 51.0683 159.965 51.241C159.792 51.4137 159.57 51.5 159.299 51.5H155.007C154.736 51.5 154.514 51.4137 154.341 51.241C154.168 51.0683 154.082 50.8463 154.082 50.575V40.326C154.082 39.4627 153.946 38.7843 153.675 38.291C153.404 37.773 153.058 37.403 152.639 37.181C152.22 36.959 151.751 36.848 151.233 36.848C150.789 36.848 150.345 36.959 149.901 37.181C149.482 37.403 149.136 37.773 148.865 38.291C148.618 38.7843 148.495 39.4503 148.495 40.289V50.575C148.495 50.8463 148.396 51.0683 148.199 51.241C148.026 51.4137 147.804 51.5 147.533 51.5H143.167ZM183.351 51.87C182.019 51.87 180.822 51.6233 179.762 51.13C178.726 50.612 177.899 49.9213 177.283 49.058C176.666 48.1947 176.358 47.2203 176.358 46.135C176.358 44.3837 177.073 43.0023 178.504 41.991C179.934 40.955 181.834 40.252 184.202 39.882L188.827 39.179V38.661C188.827 37.773 188.642 37.0947 188.272 36.626C187.902 36.1573 187.223 35.923 186.237 35.923C185.546 35.923 184.979 36.0587 184.535 36.33C184.115 36.6013 183.782 36.9713 183.536 37.44C183.314 37.7607 183.005 37.921 182.611 37.921H178.467C178.195 37.921 177.986 37.847 177.838 37.699C177.69 37.5263 177.628 37.329 177.653 37.107C177.653 36.663 177.813 36.1573 178.134 35.59C178.479 34.998 178.997 34.4183 179.688 33.851C180.378 33.2837 181.266 32.815 182.352 32.445C183.437 32.075 184.744 31.89 186.274 31.89C187.877 31.89 189.246 32.075 190.381 32.445C191.515 32.815 192.428 33.333 193.119 33.999C193.834 34.665 194.364 35.4543 194.71 36.367C195.055 37.255 195.228 38.2417 195.228 39.327V50.575C195.228 50.8463 195.129 51.0683 194.932 51.241C194.759 51.4137 194.549 51.5 194.303 51.5H190.011C189.739 51.5 189.517 51.4137 189.345 51.241C189.172 51.0683 189.086 50.8463 189.086 50.575V49.28C188.765 49.7487 188.333 50.1803 187.791 50.575C187.248 50.9697 186.607 51.278 185.867 51.5C185.151 51.7467 184.313 51.87 183.351 51.87ZM185.09 47.652C185.805 47.652 186.446 47.504 187.014 47.208C187.606 46.8873 188.062 46.4063 188.383 45.765C188.728 45.099 188.901 44.2727 188.901 43.286V42.768L185.756 43.323C184.596 43.5203 183.745 43.8287 183.203 44.248C182.685 44.6427 182.426 45.1113 182.426 45.654C182.426 46.0733 182.549 46.431 182.796 46.727C183.042 47.023 183.363 47.2573 183.758 47.43C184.152 47.578 184.596 47.652 185.09 47.652ZM221.488 51.87C219.268 51.87 217.319 51.5123 215.642 50.797C213.989 50.057 212.706 48.9347 211.794 47.43C210.881 45.9007 210.425 43.9643 210.425 41.621V26.525C210.425 26.2537 210.511 26.0317 210.684 25.859C210.856 25.6863 211.078 25.6 211.35 25.6H216.123C216.394 25.6 216.616 25.6863 216.789 25.859C216.961 26.0317 217.048 26.2537 217.048 26.525V41.584C217.048 43.1873 217.43 44.396 218.195 45.21C218.984 45.9993 220.082 46.394 221.488 46.394C222.869 46.394 223.942 45.9993 224.707 45.21C225.496 44.396 225.891 43.1873 225.891 41.584V26.525C225.891 26.2537 225.977 26.0317 226.15 25.859C226.347 25.6863 226.569 25.6 226.816 25.6H231.626C231.872 25.6 232.082 25.6863 232.255 25.859C232.452 26.0317 232.551 26.2537 232.551 26.525V41.621C232.551 43.9643 232.094 45.9007 231.182 47.43C230.269 48.9347 228.986 50.057 227.334 50.797C225.681 51.5123 223.732 51.87 221.488 51.87ZM239.862 51.5C239.591 51.5 239.369 51.4137 239.196 51.241C239.024 51.0683 238.937 50.8463 238.937 50.575V26.525C238.937 26.2537 239.024 26.0317 239.196 25.859C239.369 25.6863 239.591 25.6 239.862 25.6H244.82C245.092 25.6 245.314 25.6863 245.486 25.859C245.659 26.0317 245.745 26.2537 245.745 26.525V50.575C245.745 50.8463 245.659 51.0683 245.486 51.241C245.314 51.4137 245.092 51.5 244.82 51.5H239.862Z"
          fill="currentColor"
        />
      </svg>
    );
  },
  footer: {
    text: (
      <div
        style={{
          display: "flex",
          width: "100%",
          alignItems: "center",
          justifyContent: "space-between",
        }}
      >
        <div>
          MIT {new Date().getFullYear()} ©{" "}
          <a target="_blank" href="https://github.com/poteboy">
            poteboy
          </a>
          .
        </div>

        <svg
          xmlns="http://www.w3.org/2000/svg"
          fill="none"
          viewBox="0 0 212 44"
          className="h-8"
          width="212"
        >
          <rect width="212" height="44" fill="#000" rx="8"></rect>
          <path
            fill="#fff"
            d="M60.438 15.227V26.5h1.406v-4.023h2.836c2.117 0 3.625-1.493 3.625-3.602 0-2.148-1.477-3.648-3.61-3.648h-4.257zm1.406 1.25h2.484c1.633 0 2.531.851 2.531 2.398 0 1.492-.93 2.352-2.53 2.352h-2.485v-4.75zm11.5 10.171c2.399 0 3.883-1.656 3.883-4.359 0-2.71-1.484-4.36-3.883-4.36-2.398 0-3.883 1.65-3.883 4.36 0 2.703 1.485 4.36 3.883 4.36zm0-1.21c-1.594 0-2.492-1.157-2.492-3.149 0-2 .898-3.148 2.492-3.148 1.594 0 2.492 1.148 2.492 3.148 0 1.992-.898 3.148-2.492 3.148zm15.954-7.36h-1.352l-1.656 6.735h-.125l-1.883-6.735h-1.29l-1.882 6.735h-.125l-1.656-6.735h-1.36l2.36 8.422h1.36l1.874-6.516h.125l1.883 6.516h1.367l2.36-8.422zm4.523 1.04c1.336 0 2.227.984 2.258 2.476h-4.64c.101-1.492 1.039-2.477 2.382-2.477zm2.219 5.202c-.352.742-1.086 1.14-2.172 1.14-1.43 0-2.36-1.054-2.43-2.718v-.062h6.055v-.516c0-2.617-1.383-4.234-3.656-4.234-2.313 0-3.797 1.718-3.797 4.367 0 2.664 1.46 4.351 3.797 4.351 1.844 0 3.156-.89 3.547-2.328H96.04zm3.242 2.18h1.344v-5.219c0-1.187.93-2.047 2.211-2.047.266 0 .75.047.86.078V17.97a5.77 5.77 0 00-.672-.04c-1.117 0-2.086.579-2.336 1.4h-.125v-1.25h-1.281V26.5zm8.899-7.383c1.336 0 2.227.985 2.258 2.477h-4.641c.102-1.492 1.04-2.477 2.383-2.477zm2.219 5.203c-.352.742-1.086 1.14-2.172 1.14-1.43 0-2.359-1.054-2.43-2.718v-.062h6.055v-.516c0-2.617-1.383-4.234-3.656-4.234-2.313 0-3.797 1.718-3.797 4.367 0 2.664 1.461 4.351 3.797 4.351 1.844 0 3.156-.89 3.547-2.328H110.4zm6.36 2.328c1.164 0 2.164-.554 2.695-1.492h.125V26.5h1.281V14.734h-1.343v4.672h-.118c-.476-.922-1.468-1.476-2.64-1.476-2.141 0-3.539 1.718-3.539 4.36 0 2.648 1.382 4.358 3.539 4.358zm.312-7.507c1.524 0 2.477 1.218 2.477 3.148 0 1.945-.946 3.148-2.477 3.148-1.539 0-2.461-1.18-2.461-3.148 0-1.96.93-3.148 2.461-3.148zm14.462 7.507c2.133 0 3.531-1.726 3.531-4.359 0-2.648-1.391-4.36-3.531-4.36-1.156 0-2.18.571-2.641 1.477h-.125v-4.672h-1.344V26.5h1.282v-1.344h.125c.531.938 1.531 1.492 2.703 1.492zm-.313-7.507c1.539 0 2.453 1.18 2.453 3.148 0 1.969-.914 3.148-2.453 3.148-1.531 0-2.484-1.203-2.484-3.148s.953-3.148 2.484-3.148zm6.04 10.406c1.492 0 2.164-.578 2.882-2.531l3.29-8.938h-1.43l-2.305 6.93h-.125l-2.312-6.93h-1.453l3.117 8.43-.157.5c-.351 1.015-.773 1.383-1.546 1.383-.188 0-.399-.008-.563-.04V29.5c.188.031.422.047.602.047zm17.391-3.047l3.898-11.273h-2.148l-2.813 8.921h-.132l-2.836-8.921h-2.227l3.938 11.273h2.32zm8.016-7.18c1.164 0 1.93.813 1.969 2.078h-4.024c.086-1.25.899-2.078 2.055-2.078zm1.984 4.828c-.281.633-.945.985-1.906.985-1.273 0-2.094-.89-2.141-2.313v-.101h5.969v-.625c0-2.696-1.461-4.313-3.898-4.313-2.477 0-4.016 1.727-4.016 4.477s1.516 4.414 4.031 4.414c2.016 0 3.446-.969 3.797-2.524h-1.836zm3.547 2.352h1.938v-4.938c0-1.195.875-1.976 2.133-1.976.328 0 .843.055.992.11v-1.798c-.18-.054-.524-.085-.805-.085-1.101 0-2.023.625-2.258 1.468h-.132v-1.328h-1.868V26.5zm13.501-5.672c-.203-1.797-1.532-3.047-3.727-3.047-2.57 0-4.078 1.649-4.078 4.422 0 2.813 1.516 4.469 4.086 4.469 2.164 0 3.508-1.203 3.719-2.992h-1.844c-.203.89-.875 1.367-1.883 1.367-1.32 0-2.117-1.047-2.117-2.844 0-1.773.789-2.797 2.117-2.797 1.063 0 1.703.594 1.883 1.422h1.844zm5.117-1.508c1.164 0 1.93.813 1.969 2.078h-4.024c.086-1.25.899-2.078 2.055-2.078zm1.985 4.828c-.282.633-.946.985-1.907.985-1.273 0-2.093-.89-2.14-2.313v-.101h5.968v-.625c0-2.696-1.461-4.313-3.898-4.313-2.477 0-4.016 1.727-4.016 4.477s1.516 4.414 4.032 4.414c2.015 0 3.445-.969 3.796-2.524h-1.835zm3.625 2.352h1.937V14.648h-1.937V26.5zM23.325 13l9.325 16H14l9.325-16z"
          ></path>
          <path stroke="#5E5E5E" d="M43.5 0v44"></path>
        </svg>
      </div>
    ),
  },
  banner: {
    key: "2.0.0-release",
    text: <a href="https://github.com/kuma-ui/kuma-ui">⭐ Leave 🐻‍❄️ a star →</a>,
  },
  project: {
    link: "https://github.com/kuma-ui/kuma-ui",
  },
  chat: {
    link: "https://discord.gg/QrsQ4EPp7G",
  },
  docsRepositoryBase: "https://github.com/kuma-ui/kuma-ui/tree/main/website/",
  navbar: {
    extraContent: (
      <>
        <a
          style={{ padding: "0.5rem" }}
          target="_blank"
          href="https://twitter.com/kuma__ui"
          aria-label="Kuma UI twitter"
          rel="nofollow noreferrer"
        >
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
            viewBox="0 0 24 24"
            fill="currentColor"
            stroke="currentColor"
            strokeWidth="2"
            strokeLinecap="round"
            strokeLinejoin="round"
            className="feather feather-twitter"
          >
            <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z" />
          </svg>
        </a>
      </>
    ),
  },
  useNextSeoProps() {
    const { asPath } = useRouter();

    if (["/", "/docs"].includes(asPath)) {
      return { titleTemplate: "Kuma UI" };
    }

    return { titleTemplate: `%s | Kuma UI` };
  },
  head: () => {
    const { asPath, pathname } = useRouter();
    const { frontMatter } = useConfig();

    const ogConfig = {
      title: "Kuma UI",
      description:
        "The Modern Headless & Zero Runtime UI Component Library 🐻‍❄️✨",
      author: {
        twitter: "_poteboy_",
      },
      favicon: "/favicon.svg",
    };
    const favicon = String(ogConfig.favicon);
    const title = String(frontMatter.title || ogConfig.title);
    const description = String(frontMatter.description || ogConfig.description);
    const canonical = new URL(asPath, "https://kuma-ui.com").toString();

    const ogUrl = `https://repository-images.githubusercontent.com/621481721/33116785-e75f-434d-8335-e495413792b3`;

    return (
      <>
        <meta property="og:url" content={canonical} />
        <link rel="canonical" href={canonical} />

        <meta name="description" content={description} />
        <meta property="og:description" content={description} />
        <meta name="twitter:site" content={`@${ogConfig.author.twitter}`} />
        <meta name="twitter:creator" content={`@${ogConfig.author.twitter}`} />
        <meta name="twitter:card" content="summary_large_image" />
        <meta property="twitter:image" content={ogUrl} />
        <meta property="og:image" content={ogUrl} />

        <link rel="shortcut icon" href={favicon} type="image/svg+xml" />
        <link rel="apple-touch-icon" href={favicon} type="image/svg+xml" />
        <meta name="apple-mobile-web-app-title" content={title} />

        <link rel="preconnect" href="https://fonts.googleapis.com" />
        <link
          rel="preconnect"
          href="https://fonts.gstatic.com"
          crossOrigin="anonymous"
        />
      </>
    );
  },
};
